test("Plugin Settings",function(){
	
	expect( 14 );

	// abstract the name of the plugin
	var plugin = "plugin_test6", 
	// element to instantiate the plugin
	div = '<div></div>', 
	// configure the plugin
	config = {
		expose: "get",
		defaults: { x:1 },
		create: function( elem, opts ){
			this.opts = opts;
			},
		methods: {
			get: function(){
				return this.opts.x;
				}
			}
		};
		
	// create the plugin
	ok( jQuery.ux( plugin, config ), "plugin created successfully");
	ok( jQuery[ plugin ], "plugin function exists");
	
	// get the defaults
	equals( jQuery[ plugin ]().x, 1, "$.plugin() returns defaults" );
	equals( $( div )[ plugin ]().ux( plugin +".get"), 1, "instance holds default value" );
		
	// set the defaults
	equals( jQuery[ plugin ]({ x:2 }).x, 2, "$.plugin({ x:2 }) sets and returns defaults" );
	equals( $( div )[ plugin ]().ux( plugin +".get"), 2, "instance holds new default value" );	
	
	// override the defaults
	equals( $( div )[ plugin ]({ x:3 }).ux( plugin +".get"), 3, "instance holds custom passed value" );
	
	// create settings
	equals( jQuery[ plugin ]("a",{ x:4 }).x, 4, 'set settings seperate from defaults' );
	equals( jQuery[ plugin ]().x, 2, "defaults remain unchanged." );
	equals( $( div )[ plugin ]("a").ux( plugin +".get"), 4, "instance holds new settings value" );	
	
	// create settings (again)
	equals( jQuery[ plugin ]("b",{ x:5 }).x, 5, 'set settings seperate from defaults' );
	equals( jQuery[ plugin ]().x, 2, "defaults remain unchanged." );
	equals( $( div )[ plugin ]("b").ux( plugin +".get"), 5, "instance holds new settings value" );	
	equals( $( div )[ plugin ]("b",{ x:6 }).ux( plugin +".get"), 6, "instance holds custom passed value" );
	
	// cleanup for other tests
	jQuery.ux( plugin, false );
	});